package com.tuanzi.loan.business.entity.common;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Entity
@Table(name = "comm_product_channel")
public class CommProductChannel implements Serializable {

    private static final long serialVersionUID = -502800265269352435L;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @NotBlank
    @Length(max = 255)
    @Column(name = "channel_name")
    private String channelName;

    @NotNull
    @Column(name = "channel_code")
    private Integer channelCode;

    @NotNull
    @Column(name = "prdid")
    private Integer productId;

    @NotNull
    @Column(name = "channel_group")
    private Integer channelGroup;

    @Column(name = "secondary_channel_group")
    private Integer secondaryChannelGroup;
}